/**
 * @file
 * @author  michal.nezerka@gmail.com
 * @brief   GPX file Declaration
 *
 * Definition of GPX class and all related classes
 */

#ifndef WWGPXDB_H
#define WWGPXDB_H

#include <vector>
#include <wx/filename.h>
#include <wx/xml/xml.h>
#include "sqlite3.h"

namespace wildwood
{

enum GpxDbState
{
    eClosed,
    eOpened
};

class GpxDb
{
public:
    GpxDb();
    virtual ~GpxDb();
    sqlite3_int64 loadGpx(wxString path);
    //void sqlExecute(const wxString sql);
    void sqlExecute(const wxString sql, int (*callback)(void*, int, char**, char**) = NULL);
    void sqlQuery(const wxString sql);
    sqlite3_int64 createGpx();
    void open(const wxString &dbFileName);
    void create();
private:
    sqlite3 *mDb;
    wxFileName mDbFilePath;
    GpxDbState mDbState;
};

} // namespace

#endif // WWGPXDB_H
